package b;

import java.util.ArrayList;

//p189 ArrayList的元素存取操作
public class demo1 {
    public static void main(String[] args) {
        ArrayList arrList = new ArrayList();
        arrList.add("枕头");
        arrList.add("红色");
        arrList.add(45.8);
        arrList.add(10);
        System.out.println("商品名称\t颜色\t单价\t数量");
        for (int i = 0; i < arrList.size(); i++) {
            System.out.print(arrList.get(i) + "\t");
        }
    }
}
